package loc_enum

// 区域-区域下发到终端状态
type locRegionDownToTerminalStatus int

var LocRegionDownToTerminalStatus locRegionDownToTerminalStatus

// 未下发
func (c *locRegionDownToTerminalStatus) NotDown() int {
	return 1
}

// 下发成功
func (c *locRegionDownToTerminalStatus) Suc() int {
	return 2
}

// 下发失败
func (c *locRegionDownToTerminalStatus) Fail() int {
	return 3
}

func (c *locRegionDownToTerminalStatus) ToText(value int) string {
	switch value {

	case 1:
		return "未下发"

	case 2:
		return "下发成功"

	case 3:
		return "下发失败"

	}
	return ""
}

func (c *locRegionDownToTerminalStatus) ToValue(text string) int {
	switch text {

	case "未下发":
		return 1

	case "下发成功":
		return 2

	case "下发失败":
		return 3

	}
	return 0
}
